﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace SubstrateHelper.Models
{
    public class Inventory
    {

        [Key]
        [Display(Name = "批号/编号")]
        [StringLength(50, ErrorMessage = "批号最大长度=50！")]
        [Required(ErrorMessage = "不能为空！")]
        public string ID { get; set; }

        [Display(Name = "数量")]
        [Required(ErrorMessage = "数量不能为空！")]
        public double Quantity { get; set; }

        

        [Display(Name = "物料名")]
        [Required(ErrorMessage = "不能为空！")]        
        public string ProductionEntityName { get; set; }

        

        
        public ProductionEntity ProductionEntity { get; set; }

        public List<ProductionEntityRecord> ProductionEntityParameterRecords { get; set; }
    }
}
